<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>El Test</title>
</head>
<body>
<%
    String itemName = request.getParameter("itemName");
    String baseAmountStr = request.getParameter("baseAmount");
    String specAmountStr = request.getParameter("specAmount");
    String bonusAmountStr = request.getParameter("bonus");
    int baseAmount = Integer.parseInt(baseAmountStr);
    int specAmount = Integer.parseInt(specAmountStr);
    int bonus = Integer.parseInt(bonusAmountStr);
%>

<jsp:useBean id="itemBean" class="mvp.levelup.web.bean.ItemBean" scope="page"/>
<jsp:setProperty name="itemBean" property="itemName" value="<%=itemName%>"/>
<jsp:setProperty name="itemBean" property="amount" value="<%=(baseAmount + specAmount)%>"/>
<jsp:setProperty name="itemBean" property="bonus" value="<%=bonus%>"/>

<jsp:getProperty name="itemBean" property="itemName"/>
<br/>
<jsp:getProperty name="itemBean" property="amount"/>
<br/>
<jsp:getProperty name="itemBean" property="bonus"/>
<br/>

El Sum: ${itemBean.bonus + itemBean.amount}
<br/>
Is Test Item: ${fn:contains(itemBean.itemName,'test')}

</body>
</html>
